package com.jrx.anytxn.transaction.dto.payment;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.jrx.anytxn.i18n.annotation.ConvertField;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 交易信息返回
 *
 * @author Administrator
 * date 2019/12/22 0022
 * @version V1.0
 **/
public class TlTransactionInfoRes implements Serializable {

    /**
     * 主键
     * 表字段:id
     */
    private Long id;

    /**
     * 交易参考号
     * 表字段:txn_number
     */
    private String txnNumber;

    /**
     * 租戶id
     * 表字段:tenant_id
     */
    private String tenantId;

    /**
     * 机构号
     * 表字段:organization_id
     */
    private String organizationId;

    /**
     * 渠道id
     * 表字段:channel
     */
    private String channel;

    /**
     * 客户id
     * 表字段:customer_id
     */
    private String customerId;

    /**
     * 流水号
     * 表字段:seq_no
     */
    private String seqNo;

    /**
     * 贷款订单id
     * 表字段:loan_id
     */
    private String loanId;

    /**
     * 产品id
     * 表字段:product_id
     */
    private String productId;

    /**
     * 交易码
     * 表字段:txn_code
     */
    private String txnCode;

    /**
     * 交易描述
     * 表字段:txn_description
     */
    @ConvertField(fieldCode = "",fieldTable = "pr_transaction_code_table",fieldType = "2")
    private String txnDescription;

    /**
     * 入账金额
     * 表字段:posting_amount
     */
    @JsonSerialize(using= ToStringSerializer.class)
    private BigDecimal postingAmount;

    /**
     * 原始交易参考号
     * 表字段:original_txn_number
     */
    private String originalTxnNumber;

    /**
     * 冲正标识 0:非冲正交易 1:冲正交易
     * 表字段:reversal_flag
     */
    private String reversalFlag;

    /**
     * 入账日期
     * 表字段:posting_date
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date postingDate;

    /**
     * 交易时间
     * 表字段:txn_time
     */
    private Date txnTime;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getTxnNumber() {
        return txnNumber;
    }

    public void setTxnNumber(String txnNumber) {
        this.txnNumber = txnNumber;
    }

    public String getTenantId() {
        return tenantId;
    }

    public void setTenantId(String tenantId) {
        this.tenantId = tenantId;
    }

    public String getOrganizationId() {
        return organizationId;
    }

    public void setOrganizationId(String organizationId) {
        this.organizationId = organizationId;
    }

    public String getChannel() {
        return channel;
    }

    public void setChannel(String channel) {
        this.channel = channel;
    }

    public String getCustomerId() {
        return customerId;
    }

    public void setCustomerId(String customerId) {
        this.customerId = customerId;
    }

    public String getSeqNo() {
        return seqNo;
    }

    public void setSeqNo(String seqNo) {
        this.seqNo = seqNo;
    }

    public String getLoanId() {
        return loanId;
    }

    public void setLoanId(String loanId) {
        this.loanId = loanId;
    }

    public String getProductId() {
        return productId;
    }

    public void setProductId(String productId) {
        this.productId = productId;
    }

    public String getTxnCode() {
        return txnCode;
    }

    public void setTxnCode(String txnCode) {
        this.txnCode = txnCode;
    }

    public String getTxnDescription() {
        return txnDescription;
    }

    public void setTxnDescription(String txnDescription) {
        this.txnDescription = txnDescription;
    }

    public BigDecimal getPostingAmount() {
        return postingAmount;
    }

    public void setPostingAmount(BigDecimal postingAmount) {
        this.postingAmount = postingAmount;
    }

    public String getOriginalTxnNumber() {
        return originalTxnNumber;
    }

    public void setOriginalTxnNumber(String originalTxnNumber) {
        this.originalTxnNumber = originalTxnNumber;
    }

    public String getReversalFlag() {
        return reversalFlag;
    }

    public void setReversalFlag(String reversalFlag) {
        this.reversalFlag = reversalFlag;
    }

    public Date getPostingDate() {
        return postingDate;
    }

    public void setPostingDate(Date postingDate) {
        this.postingDate = postingDate;
    }

    public Date getTxnTime() {
        return txnTime;
    }

    public void setTxnTime(Date txnTime) {
        this.txnTime = txnTime;
    }
}
